package com.liu.cloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class OrderController {
    @Autowired
    private RestTemplate template;

    private static final String URL="http://cloud-provider-server";

    @GetMapping("/order/consul")
    public String zk(){
        String result = template.getForObject(URL + "/payment/consul", String.class);
        return result;
    }
}
